﻿@model ScmSafetyconstructiondicViewModel
@{
    Layout = null;
    ViewBag.Title = "字典项列表";
}
<script type="text/javascript">
    $(document).ready(function () {
        $(".comsplitpage").val("@ViewBag.numPerPage");
    });
</script>
<div class="pageHeader">
    @using (Html.BeginForm("SplitPage", "ScmSafetyConstructionDic", null, FormMethod.Post, new { id = "pagerForm", onsubmit = "return divSearch(this, 'xtgl_zdgl_list2');" }))
    {
        <input type="hidden" name="pageNum" value="1" />
        <input type="hidden" name="numPerPage" value="@(ViewBag.numPerPage)" />
        <input type="hidden" name="PId" value="@(ViewBag.PId)" />
        <div class="searchBar">
            <table class="searchContent">
                <tr>
                    <td>名称：<input type="text" name="iput_name" value="@(ViewBag.iput_name)" />
                    </td>
                    <td>编码：<input type="text" name="iput_code" value="@(ViewBag.iput_code)" />
                    </td>
                    <td>
                        <button type="submit" class="btn btn-success btn-xs">搜索</button>
                    </td>
                </tr>
            </table>
        </div>
    }
</div>
<div class="pageContent">
    <div class="panelBar">
        <ul class="toolBar">
             <li>
                @Html.PermissionButton("SafetyConstruction.ScmSafetyConstructionDic.Create", "SafetyConstruction_ScmSafetyConstructionDic_SafetyConstructionDicAdd",
                    Url.Action("SafetyConstructionDicAdd", "ScmSafetyConstructionDic", new { pid = ViewBag.PId }),
                    "添加",
                    new Dictionary<string, object>
                    {
                        {"class","add"},{"rel","xtgl_zdgl_add"} ,{"mask","true"},{"target","dialog"},{"width","520"},{"height","230"}
                    })
            </li>
             <li>
                @Html.PermissionButton("SafetyConstruction.ScmSafetyConstructionDic.Delete", "SafetyConstruction_ScmSafetyConstructionDic_SafetyConstructionDicDelete",
                    Url.Action("SafetyConstructionDicDelete", "ScmSafetyConstructionDic", new { ids = "{tr_id}"  }),
                    "删除",
                    new Dictionary<string, object>
                    {
                        {"class","delete"},{"title","确定要删除这些记录吗?"},{"target","ajaxTodo"},{"callback","function(){$('#pagerForm', navTab.getCurrentPanel()).submit();}"}
                    })
            </li>
           <li>
                @Html.PermissionButton("SafetyConstruction.ScmSafetyConstructionDic.BatchDelete", "SafetyConstruction_ScmSafetyConstructionDic_SafetyConstructionDicDelete",
                    Url.Action("SafetyConstructionDicDelete", "ScmSafetyConstructionDic"),
                    "批量删除",
                    new Dictionary<string, object>
                    {
                        {"class","delete"},{"rel","ids"} ,{"title","确定要删除这些记录吗?"},{"target","selectedTodo"},{"postType","string"},{"callback","function(){$('#pagerForm', navTab.getCurrentPanel()).submit();}"}
                    })
            </li>
           <li>
                @Html.PermissionButton("SafetyConstruction.ScmSafetyConstructionDic.Edit", "SafetyConstruction_ScmSafetyConstructionDic_SafetyConstructionDicEdit",
                    Url.Action("SafetyConstructionDicEdit", "ScmSafetyConstructionDic", new { id = "{tr_id}" }),
                    "修改",
                    new Dictionary<string, object>
                    {
                        {"class","edit"},{"rel","xtgl_zdgl_edit"} ,{"mask","true"},{"target","dialog"},{"width","520"},{"height","230"},{"warn","请选择一条信息！"}
                    })
            </li>
            
            <li class="line">line</li>
        </ul>
    </div>
    <table class="table" width="100%" layouth="120" rel="xtgl_zdgl_list2">
        <thead>
            <tr>
                <th width="20" align="center">
                    <input type="checkbox" group="ids" class="checkboxCtrl"></th>
                <th width="30" align="center">序号</th>
                <th width="100" align="center">名称</th>
                <th width="80" align="center">编码</th>
                <th width="110" align="center">描述</th>
                <th width="110" align="center">备注</th>
            </tr>
        </thead>
        <tbody>
            @{ int num = (ViewBag.pageNum - 1) * ViewBag.numPerPage;}
            @foreach (ScmSafetyconstructiondicInfo info in Model.TheSafetyconstructiondicList)
            {
                num += 1;
                <tr target="tr_id" rel="@info.Scd_ID" align="center">
                    <td>
                        <input name="ids" value="@info.Scd_ID" type="checkbox"></td>
                    <td align="center">@num</td>
                    <td align="center">@info.Scd_Name</td>
                    <td align="center">@info.Scd_Code</td>
                    <td align="center">@info.Scd_Description</td>
                    <td align="center">@info.Scd_Remark</td>
                </tr>
            }
        </tbody>
    </table>
    <div class="panelBar">
        <div class="pages">
            <span>显示</span>
            <select class="comsplitpage" name="numPerPage" onchange="navTabPageBreak({numPerPage:this.value}, 'xtgl_zdgl_list2')">
                <option value="10">10</option>
                <option value="20" selected="selected">20</option>
                <option value="50">50</option>
            </select>
            <span>条，共@(ViewBag.pagenumshown)页,@(ViewBag.totalcount)条</span>
        </div>
        <div class="pagination" rel="xtgl_zdgl_list2" totalcount="@(ViewBag.totalcount)" numperpage="@(ViewBag.numPerPage)" pagenumshown="10" currentpage="@(ViewBag.pageNum)"></div>

    </div>
</div>

